package io.qar.categories.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.qar.commons.tools.utils.DateUtils;
import io.qar.utils.TreeNode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import io.qar.commons.mybatis.dto.CreateAndUpdatedDTO;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
* 分类信息表
*
* @author yyyyjinying 1020066395@qq.com
* @since 3.0 2024-06-02
*/
@Data
@ApiModel(value = "分类信息表")
public class CategoriesDTO extends TreeNode implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "分类ID")
    private Long categoryId;
    @ApiModelProperty(value = "父分类ID")
    private Long parentId;
    @ApiModelProperty(value = "餐厅ID")
    private Long restaurantId;
    @ApiModelProperty(value = "分类名称")
    private String name;
    @ApiModelProperty(value = "分类描述")
    private String description;
    @ApiModelProperty(value = "是否启用：1-启用，0-禁用")
    private Integer isActive;
    @ApiModelProperty(value = "分类图片URL")
    private String imageUrl;
    @ApiModelProperty(value = "排序字段，默认值为0")
    private Integer sortOrder;
    @ApiModelProperty(value = "创建人")
    private Long creator;
    @ApiModelProperty(value = "更新 人")
    private Long updater;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern= DateUtils.DATE_TIME_PATTERN)
    @DateTimeFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date createdAt;
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern=DateUtils.DATE_TIME_PATTERN)
    @DateTimeFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date updatedAt;

    @ApiModelProperty(value = "上级分类名称")
    private String parentName;

    @ApiModelProperty(value = "餐厅名称")
    private String restaurantName;

}